package command;

/**
 * @author : DuJiabao
 * @Date : 2021/3/16 15:52
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class LightOnCommand implements Command {
  private Light light;

  public LightOnCommand(Light light) {
    this.light = light;
  }

  @Override
  public void execute() {
    light.on();
  }

  @Override
  public void undo() {
    light.off();
  }
}
